/**************************************************
|	File:		MapImage.h
|	Author:		Benjamin Budian
|	Course:		SGD
|	Purpose:	Handles storing and rendering of background images
**************************************************/
#pragma once

/////////////////////////////////////
//Remove if accessing game singleton
#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
/////////////////////////////////////

#define MAP_COL 32
#define MAP_ROW 32
#define TOTAL_TILES 15

class Object;

class CMapImage
{
public:
	CMapImage(void);
	~CMapImage(void);

	void Initialize(void);
	void Shutdown(void);
	void Release(void);
	void Render(void);
	void LoadMap();

	/*void AddItem(int nRow, int nCol, int nItemID);*/

private:

	//enum Tiles { INSIDE_CAVE_TOP_LEFT = 36, INSIDE_CAVE_TOP_RIGHT = 35, INSIDE_CAVE_BOTTOM_LEFT = 4, INSIDE_CAVE_BOTTOM_RIGHT = 3, INSIDE_CAVE_TOP_WALL1 = 65, INSIDE_CAVE_LEFT_TOP_WALL1 = 68, INSIDE_CAVE_RIGHT_TOP_WALL1 = 67, INSIDE_CAVE_TOP_WALL2 = 97, INSIDE_CAVE_LEFT_TOP_WALL2 = 100, INSIDE_CAVE_RIGHT_TOP_WALL2 = 99, INSIDE_CAVE_TOP_WALL3 = 129, INSIDE_CAVE_BOTTOM = 1, INSIDE_CAVE_LEFT_WALL = 34, INSIDE_CAVE_RIGHT_WALL = 32, CAVE_FLOOR = 38 };
	enum InsideCaveTiles {
		INSIDE_CAVE_TOP_LEFT, INSIDE_CAVE_TOP_RIGHT, INSIDE_CAVE_BOTTOM_LEFT, INSIDE_CAVE_BOTTOM_RIGHT,
		INSIDE_CAVE_TOP_WALL1, INSIDE_CAVE_LEFT_TOP_WALL1, INSIDE_CAVE_RIGHT_TOP_WALL1, INSIDE_CAVE_TOP_WALL2,
		INSIDE_CAVE_LEFT_TOP_WALL2, INSIDE_CAVE_RIGHT_TOP_WALL2, INSIDE_CAVE_TOP_WALL3, INSIDE_CAVE_BOTTOM,
		INSIDE_CAVE_LEFT_WALL, INSIDE_CAVE_RIGHT_WALL, CAVE_FLOOR
	};
	enum OutsideCaveTiles {
		OUTSIDE_CAVE_TOP_LEFT, OUTSIDE_CAVE_TOP_RIGHT, OUTSIDE_CAVE_BOTTOM_LEFT, OUTSIDE_CAVE_BOTTOM_RIGHT,
		OUTSIDE_CAVE_TOP_WALL1, OUTSIDE_CAVE_LEFT_TOP_WALL1, OUTSIDE_CAVE_RIGHT_TOP_WALL1, OUTSIDE_CAVE_TOP_WALL2,
		OUTSIDE_CAVE_LEFT_TOP_WALL2, OUTSIDE_CAVE_RIGHT_TOP_WALL2, OUTSIDE_CAVE_TOP_WALL3, OUTSIDE_CAVE_BOTTOM,
		OUTSIDE_CAVE_LEFT_WALL, OUTSIDE_CAVE_RIGHT_WALL, FLOOR
	};
	enum Objects{
		TREE_1, TREE_2, TREE_STUMP, STONE_FACE
	};

	Object* CreateObject(int row, int column, int id);

	int tile_list[TOTAL_TILES];
	/*
	inside_cave_top_left
	inside_cave_top_row_1
	inside_cave_top_row_2
	inside_cave_top_row_3
	*/

	RECT CellAlgorithm(int id) const;
	/*void LoadTileset();*/


	int m_nGameMap[MAP_ROW][MAP_COL];
	int m_nGameBackground[MAP_ROW][MAP_COL];
	int m_nTileWidth, m_nTileHeight;

	int m_nImageID;

};

